// RedJey Graphics User Interface Library for J2ME Platform.
// Copyright (C) 2008 Yevgen Krapiva
//
// This library is free software; you can redistribute
// it and/or modify it under the terms of the
// GNU Lesser General Public License as published
// by the Free Software Foundation; either version 3.0
// of the License, or any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this library; if not, write to the Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//

package com.incrediblesoft.redjey.borders;

/**
 * @author Yevgen Krapiva<br>
 *         Homepage: http://code.google.com/p/redjey/<br>
 *         Feedback: ykrapiva@gmail.com<br>
 *         Copyright (C) 2008 Yevgen Krapiva<br>
 */

import javax.microedition.lcdui.Graphics;
import java.util.Hashtable;

public abstract class AbstractBorder
{
    /**
     * Creates a new border.
     * The width of this border is set to the default value 1 here.
     */
    public AbstractBorder()
    {

    }

    public AbstractBorder(Hashtable styleDesc)
    {
        this();        
    }

    abstract public int getLeftBorderWidth();
    abstract public int getTopBorderWidth();
    abstract public int getRightBorderWidth();
    abstract public int getBottomBorderWidth();

    abstract public int getMinWidth();
    abstract public int getMinHeight();
    
    public void tick(int dt)
    {
        
    }

    /**
     * Paints this border.
     *
     * @param x  the horizontal start point
     * @param y  the vertical start point
     * @param width  the width of the border
     * @param height  the height of the border
     * @param g  the Graphics on which the border should be painted.
     */
    public abstract void paint(Graphics g, int x, int y, int width, int height);

    public abstract AbstractBorder clone();

}
